package io.renren.modules.controller;

import io.renren.annotation.Login;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.dto.BsOrderConsumerDTO;
import io.renren.modules.service.BsOrderConsumerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Map;


/**
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2024-05-27
 */
@RestController
@RequestMapping("/bsOrderConsumer")
@Api(tags = "消费订单接口")
public class BsOrderConsumerController {

    @Autowired
    private BsOrderConsumerService bsOrderConsumerService;


    @Login
    @ApiOperation("查询用户消费订单列表")
    @PostMapping("/listConsumerOrder")
    public Result listConsumerOrder(@RequestAttribute("consumerNo") String consumerNo) {


        return null;
    }


    @Login
    @ApiOperation("查询消费订单详情")
    @PostMapping("/getConsumerOrderDetail")
    public Result getConsumerOrderDetail(@RequestAttribute("consumerNo") String consumerNo, String consumeOrderNo) {


        return null;
    }

    /**
     * 根据房间编号和产品编号创建订单，并扣款成功，返回扣款结果
     * 创建账户变动记录
     *
     * @param roomNo
     * @param productNo
     * @return
     */
    @Login
    @ApiOperation("创建消费订单")
    @PostMapping("/createConsumeOrder")
    public Result createConsumeOrder(@RequestAttribute("consumerNo") String consumerNo, String roomNo, String productNo) {


        return new Result().ok("创建消费订单");
    }


}